package com.four.bergain.controller;


import com.four.bergain.service.IBargainPeopleService;
import com.guli.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gs
 * @since 2021-12-19
 */
@RestController
@RequestMapping("/bargain-people")
public class BargainPeopleController {

    @Autowired
    private IBargainPeopleService bargainPeopleService;

    /**
     * 添加帮砍价
     * @param uid 帮谁
     * @param baId 什么商品
     * @param userId 用户
     * @return
     */
    @GetMapping("savePeople/{uId}/{baId}/{userId}")
    public R savePeople(
            @PathVariable("uId") Integer uid,
            @PathVariable("baId") Integer baId,
            @PathVariable("userId") Integer userId
    ) {

        return bargainPeopleService.savePeople(uid,baId,userId);
    }



}
